﻿// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_FIN_RECEIVED_DETAIL_ITEM
// * CreateDate    : 2012-10-19 3:24:15
// * Creater       : CodeSmith
// * LastChangeDate: 2012-10-19 3:24:15
// * LastChanger   : 2012-10-19 3:24:15
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class FinReceivedDetailItemEntity : EntityBase
    {
        public FinReceivedDetailItemTable TableSchema
        {
            get
            {
                return FinReceivedDetailItemTable.Current;
            }
        }

        public FinReceivedDetailItemEntity()
        {

        }

        public FinReceivedDetailItemEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
            this.ReceivedDetailId = Convert.ToString(CommonFunctions.ToObject(dr["RECEIVED_DETAIL_ID"]));
            this.DeliveryOrderCode = Convert.ToString(CommonFunctions.ToObject(dr["DELIVERY_ORDER_CODE"]));
            this.ProductCode = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_CODE"]));
            this.ProductSpecIn = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_SPEC_IN"]));
            this.ProductName = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_NAME"]));
            this.DeliveryDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["DELIVERY_DATE"]));
            this.OrderPersonName = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_PERSON_NAME"]));
            this.ItemAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["ITEM_AMOUNT"]));
            this.BillingAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["BILLING_AMOUNT"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public FinReceivedDetailItemEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
            this.ReceivedDetailId = Convert.ToString(CommonFunctions.ToObject(dr["RECEIVED_DETAIL_ID"]));
            this.DeliveryOrderCode = Convert.ToString(CommonFunctions.ToObject(dr["DELIVERY_ORDER_CODE"]));
            this.ProductCode = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_CODE"]));
            this.ProductSpecIn = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_SPEC_IN"]));
            this.ProductName = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_NAME"]));
            this.DeliveryDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["DELIVERY_DATE"]));
            this.OrderPersonName = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_PERSON_NAME"]));
            this.ItemAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["ITEM_AMOUNT"]));
            this.BillingAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["BILLING_AMOUNT"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return FinReceivedDetailItemTable.Current;
            }
        }

        #region Perporty List
        public string Id
        {
            get { return Convert.ToString(GetData(FinReceivedDetailItemTable.C_ID)); }
            set { SetData(FinReceivedDetailItemTable.C_ID, value); }
        }

        public string ReceivedDetailId
        {
            get { return Convert.ToString(GetData(FinReceivedDetailItemTable.C_RECEIVED_DETAIL_ID)); }
            set { SetData(FinReceivedDetailItemTable.C_RECEIVED_DETAIL_ID, value); }
        }

        public string DeliveryOrderCode
        {
            get { return Convert.ToString(GetData(FinReceivedDetailItemTable.C_DELIVERY_ORDER_CODE)); }
            set { SetData(FinReceivedDetailItemTable.C_DELIVERY_ORDER_CODE, value); }
        }

        public string ProductCode
        {
            get { return Convert.ToString(GetData(FinReceivedDetailItemTable.C_PRODUCT_CODE)); }
            set { SetData(FinReceivedDetailItemTable.C_PRODUCT_CODE, value); }
        }

        public string ProductSpecIn
        {
            get { return Convert.ToString(GetData(FinReceivedDetailItemTable.C_PRODUCT_SPEC_IN)); }
            set { SetData(FinReceivedDetailItemTable.C_PRODUCT_SPEC_IN, value); }
        }

        public string ProductName
        {
            get { return Convert.ToString(GetData(FinReceivedDetailItemTable.C_PRODUCT_NAME)); }
            set { SetData(FinReceivedDetailItemTable.C_PRODUCT_NAME, value); }
        }

        public DateTime DeliveryDate
        {
            get { return Convert.ToDateTime(GetData(FinReceivedDetailItemTable.C_DELIVERY_DATE)); }
            set { SetData(FinReceivedDetailItemTable.C_DELIVERY_DATE, value); }
        }

        public string OrderPersonName
        {
            get { return Convert.ToString(GetData(FinReceivedDetailItemTable.C_ORDER_PERSON_NAME)); }
            set { SetData(FinReceivedDetailItemTable.C_ORDER_PERSON_NAME, value); }
        }

        public decimal ItemAmount
        {
            get { return Convert.ToDecimal(GetData(FinReceivedDetailItemTable.C_ITEM_AMOUNT)); }
            set { SetData(FinReceivedDetailItemTable.C_ITEM_AMOUNT, value); }
        }

        public decimal BillingAmount
        {
            get { return Convert.ToDecimal(GetData(FinReceivedDetailItemTable.C_BILLING_AMOUNT)); }
            set { SetData(FinReceivedDetailItemTable.C_BILLING_AMOUNT, value); }
        }

        public string Remark
        {
            get { return Convert.ToString(GetData(FinReceivedDetailItemTable.C_REMARK)); }
            set { SetData(FinReceivedDetailItemTable.C_REMARK, value); }
        }

        #endregion
    }


}

